namespace DataModels.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class TripReportCreators : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.TripReports", "CreatedByUserId", c => c.Int(nullable: false));
            CreateIndex("dbo.TripReports", "CreatedByUserId");
            AddForeignKey("dbo.TripReports", "CreatedByUserId", "dbo.Users", "ID", cascadeDelete: true);
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.TripReports", "CreatedByUserId", "dbo.Users");
            DropIndex("dbo.TripReports", new[] { "CreatedByUserId" });
            DropColumn("dbo.TripReports", "CreatedByUserId");
        }
    }
}
